package com.library.lms.service.impl;

import com.library.lms.dao.UserMapper;
import com.library.lms.entity.User;
import com.library.lms.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl implements UserService {
    @Resource
    public UserMapper userMapper;
    @Override
    public User  selectUser(String name, String password) {

        return userMapper.queryUser(name,password);
    }

    @Override
    public int addUserInfo(User user) {
        return userMapper.insertUser(user);
    }
}
